home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1996-05-01 | 67.3 KB | 1,870 lines | [ TEXT/MPS ]
{ File: BlockStorage.p Contains: External interfaces to Block Storage Family Version: Technology: Copland Release: Universal Interfaces 3.0d3 on Copland DR1 Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved. Bugs?: If you find a problem with this file, send the file and version information (from above) and the problem description to: Internet: apple.bugs@applelink.apple.com AppleLink: APPLE.BUGS } {$IFC UNDEFINED UsingIncludes} {$SETC UsingIncludes := 0} {$ENDC} {$IFC NOT UsingIncludes} UNIT BlockStorage; INTERFACE {$ENDC} {$IFC UNDEFINED __BLOCKSTORAGE__} {$SETC __BLOCKSTORAGE__ := 1} {$I+} {$SETC BlockStorageIncludes := UsingIncludes} {$SETC UsingIncludes := 1} {$IFC UNDEFINED __TYPES__} {$I Types.p} {$ENDC} {$IFC UNDEFINED __MATH64__} {$I Math64.p} {$ENDC} {$IFC UNDEFINED __ERRORS__} {$I Errors.p} {$ENDC} {$IFC UNDEFINED __NAMEREGISTRY__} {$I NameRegistry.p} {$ENDC} {$IFC UNDEFINED __IOMEMORYLISTS__} {$I IOMemoryLists.p} {$ENDC} {$IFC UNDEFINED __IOITERATOR__} {$I IOIterator.p} {$ENDC} {$PUSH} {$ALIGN POWER} {$LibExport+} {$IFC FOR_SYSTEM8_PREEMPTIVE } { ****************************************************************************** ******************************************************************************* ******************************************************************************* Block Storage Constants ******************************************************************************* ******************************************************************************* ***************************************************************************** } { ****************************************************************************** Store property names ***************************************************************************** } { ****************************************************************************** Container property names ***************************************************************************** } { ****************************************************************************** StoreOpenOptions is the set of permissions available when making a Connection to a Store. These options can be OR'd together in any combination. ***************************************************************************** } CONST kBSStoreRead = $00000001; { Allow reading/positioning } kBSStoreWrite = $00000002; { Allow writing } kBSStoreExclusiveIO = $00000004; { Don't allow another IO Connection to be opened } kBSStoreExclusiveCntrl = $00000008; { Don't allow another control Connection to be opened } kBSStoreResizeOK = $00000010; { Resizing of the Store is OK (but, of course, notify me) } kBSStoreControl = $00000020; { Allow me to control the Store } TYPE BSStoreOpenOptions = UInt32; { ****************************************************************************** BSContainerOpenOptions is the set of permissions available when making a Connection to a Container. These options can be OR'd together in any combination. ***************************************************************************** } CONST kBSContainerExclusiveCntrl = $00000001; { Don't allow another Connection to be opened } TYPE BSContainerOpenOptions = UInt32; { **************************************************************************** Accessibility states Accessibility States indicate how accessible a Block Storage Container or Store is. There are four currently defined. Their absolute values are unimportant, but have been split across fairly large ranges to allow for future values to be inserted between them. kBSOnline and kBSOffline represent the two extremes of accessibility - nothing can be less accessible than kBSOffline (that is the state you send a Store to when you are about to delete it) and nothing can be more online than kBSOnline, which means you are fully, 100% available. *************************************************************************** } CONST kBSOnline = $0FFFFFFF; kBSPowerSave = $0A000000; kBSOutOfDrive = $01000000; kBSOffline = 0; TYPE BSAccessibilityState = UInt32; { **************************************************************************** Component types *************************************************************************** } CONST kBSExternalDeviceComponent = 1; kBSStoreComponent = 2; TYPE BSComponentType = UInt32; { **************************************************************************** Block List Seek specifiers *************************************************************************** } CONST kBSBlockListSeekByteAbsolute = 1; kBSBlockListSeekByteRelative = 2; kBSBlockListSeekExtentAbsolute = 3; kBSBlockListSeekExtentRelative = 4; kBSBlockListSeekBlockAbsolute = 5; kBSBlockListSeekBlockRelative = 6; TYPE BSBlockListWhence = UInt32; { **************************************************************************** Selectors for BSStoreGetDeviceData - specifies which set of Stores to return *************************************************************************** } CONST kBSStoreGetLeafStores = 1; kBSStoreGetAllStores = 2; kBSStoreGetPrimaryStores = 3; TYPE BSStoreGetSelector = UInt32; { **************************************************************************** Format specifiers - these are generic categories. There may be further distinctions within these categories for number of blocks, etc. *************************************************************************** } CONST kBSFormatFloppyGCR = 'gcr '; kBSFormatFloppyMFM = 'mfm '; kBSFormatSCSI = 'scsi'; kBSFormatATA = 'ata '; kBSNotFormatable = 'none'; TYPE BSStoreFormatType = OSType; CONST kBSMaxFormats = 8; { Maximum number of formats a Mapping plug-in can support } { **************************************************************************** ***************************************************************************** ***************************************************************************** Block Storage Error codes ***************************************************************************** ***************************************************************************** *************************************************************************** } { **************************************************************************** Basic error types *************************************************************************** } E_Success = $00000000; E_LoopTermination = $08000000; E_Underflow = $10000000; E_Overflow = $18000000; E_AlreadyExists = $20000000; E_NotFound = $28000000; E_AccessViolation = $30000000; E_Busy = $38000000; E_VersionMismatch = $40000000; E_Canceled = $48000000; E_OutOfResources = $50000000; E_Timeout = $58000000; E_ParameterError = $60000000; E_Fatal = $68000000; E_Unknown = $F8000000; { **************************************************************************** Block Storage Error ID *************************************************************************** } E_BlockStorageBias = $04F00000; { **************************************************************************** Block Storage Error Categories *************************************************************************** } E_BSFamilyError = $04F00000; E_BSExpertError = $04F08000; E_BSMappingPlugInError = $04F10000; E_BSPartitioningPlugInError = $04F18000; E_BSContainerPlugInError = $04F20000; E_BSBlockListError = $04F28000; E_BSSuccess = $00000000; { **************************************************************************** Family Errors *************************************************************************** } E_BSOutOfResources = $54F00001; E_BSStoreInUse = $34F00001; E_BSStoreWriteProtected = $34F00002; E_BSStoreNotFound = $2CF00001; E_BSBadMessage = $64F00001; E_BSBadConnection = $64F00002; E_BSTableTooSmall = $64F00003; E_BSNullParameters = $64F00004; E_BSParameterError = $64F00005; E_BSUnimplemented = $44F00001; { **************************************************************************** Expert Errors *************************************************************************** } E_BSEPlugInNotFound = $2CF08001; E_BSENoPlugInMatch = $2CF08002; E_BSENoMoreStores = $54F08001; E_BSEHierarchyTooDeep = $54F08002; E_BSEOutOfResources = $54F08003; { **************************************************************************** Mapping Plug-in Errors *************************************************************************** } E_BSMPIOutOfStoreBounds = $64F10001; E_BSMPITooManyMappings = $64F10002; E_BSMPIBadMappingParams = $64F10003; E_BSMPIMappingNotSupported = $64F10004; E_BSMPIStateNotSupported = $64F10005; E_BSMPIWriteProtected = $34F10001; E_BSMPICannotGoToState = $34F10002; E_BSMPIUnitNotResponding = $6CF10001; E_BSMPITransferError = $6CF10002; E_BSMPIMemoryAccessFault = $6CF10003; E_BSMPINoPlugIn = $6CF10004; E_BSMPIMediaRemoved = $6CF10005; E_BSMPIOutOfResources = $54F10001; { **************************************************************************** Partitioning Plug-in Errors *************************************************************************** } E_BSPPIMappingNotSupported = $64F18001; E_BSPPIOverlappingPartition = $64F18002; E_BSPPIOutOfStoreBounds = $64F18003; E_BSPPIPartitionNonExistant = $64F18004; E_BSPPITooManyPartitions = $64F18005; E_BSPPINoPlugIn = $6CF18001; E_BSPPIOutOfResources = $54F18002; { **************************************************************************** Container Plug-in Errors *************************************************************************** } { **************************************************************************** Block List Errors *************************************************************************** } E_BSBLEndOfList = $14F28001; E_BSBLParameterError = $64F28001; E_BSBLBadBlockList = $64F28002; E_BSBLBadBlock = $64F28003; E_BSBLAlreadyFinalized = $24F28001; E_BSBLOutOfResources = $54F28001; { **************************************************************************** ***************************************************************************** ***************************************************************************** Block Storage Types and Structures ***************************************************************************** ***************************************************************************** *************************************************************************** } { **************************************************************************** Store and Container Persistent Identifiers *************************************************************************** } TYPE BSStoreID = PACKED ARRAY [0..11] OF CHAR; BSContainerID = PACKED ARRAY [0..11] OF CHAR; { **************************************************************************** Connection ID's *************************************************************************** } BSContainerConnID = ObjectID; BSStoreConnID = ObjectID; { **************************************************************************** Plug-in run-time references. References the plug-in in general, not a specific instance of it *************************************************************************** } BSMappingPlugInRef = ^LONGINT; BSPartitioningPlugInRef = ^LONGINT; BSContainerPlugInRef = ^LONGINT; { **************************************************************************** Store and Container Run-Time References *************************************************************************** } BSStoreRef = RegEntryRef; BSStoreRefPtr = ^BSStoreRef; BSContainerRef = RegEntryRef; BSContainerRefPtr = ^BSContainerRef; { **************************************************************************** Store and Container Navigation API types *************************************************************************** } BSStoreIteratorID = ObjectID; BSContainerIteratorID = ObjectID; BSStorePropertyInstance = RegPropertyInstance; BSContainerPropertyInstance = RegPropertyInstance; { **************************************************************************** Device block descriptor types *************************************************************************** } BSByteCount = UInt64; BSByteCountPtr = ^BSByteCount; BSBlockListRef = ^LONGINT; BSBlockListDescriptorRef = ^LONGINT; { ****************************************************************************** BSBlockListDescriptorInfo - information about a Block List Descriptor ***************************************************************************** } BSBlockListDescriptorInfoPtr = ^BSBlockListDescriptorInfo; BSBlockListDescriptorInfo = RECORD bias: BSByteCount; start: BSByteCount; length: UInt32; parentDescriptor: BSBlockListDescriptorRef; parentList: BSBlockListRef; END; { **************************************************************************** BSStoreFormatInfo *************************************************************************** } BSFormatIndex = ItemCount; BSStoreFormatInfoPtr = ^BSStoreFormatInfo; BSStoreFormatInfo = RECORD formatType: BSStoreFormatType; formatSize: BSByteCount; formatNum: BSFormatIndex; { Format identifier - specific to Mapping plug-in } END; { **************************************************************************** BSStoreInfo is used to return information about a Store *************************************************************************** } BSStoreInfoPtr = ^BSStoreInfo; BSStoreInfo = RECORD storeID: BSStoreID; storeSize: BSByteCount; readBlockSize: BSByteCount; { minimum read size & granularity } writeBlockSize: BSByteCount; { minimum write size & granularity } container: BSContainerRef; { the container containing this Store } numChildren: ItemCount; numParents: ItemCount; numPartitions: ItemCount; { Number of partitions in use } maxPartitions: ItemCount; { Maximum number of partitions possible } isPartitioned: BOOLEAN; { True if a partitioning plug-in is associated with this Store } isEjectable: BOOLEAN; isBootDevice: BOOLEAN; isWriteable: BOOLEAN; hasAutoEjectHardware: BOOLEAN; isFormattable: BOOLEAN; isPartitionable: BOOLEAN; isFilesystem: BOOLEAN; mappingPlugIn: BSMappingPlugInRef; partitioningPlugIn: BSPartitioningPlugInRef; curFormat: BSStoreFormatInfo; possibleFormats: ARRAY [0..7] OF BSStoreFormatInfo; name: Str255; { Max name size is 255 (0 terminated) } typeName: Str32; { Max type name is 32 (0 terminated) } END; { **************************************************************************** BSContainerInfo is used to return information about a Container *************************************************************************** } BSContainerInfoPtr = ^BSContainerInfo; BSContainerInfo = RECORD device: RegEntryRef; numChildren: ItemCount; ejectable: BOOLEAN; END; { **************************************************************************** BSPartitionInfo is used to return information about a Partition *************************************************************************** } BSPartitionDescriptorPtr = ^BSPartitionDescriptor; BSPartitionDescriptor = RECORD entryNum: ItemCount; start: BSByteCount; len: BSByteCount; destStoreID: BSStoreID; isPartitionable: BOOLEAN; isFilesystem: BOOLEAN; reserved1: BOOLEAN; reserved2: BOOLEAN; name: Str255; { Max name size is 255 (0 terminated) } typeName: Str32; { Max type name is 32 (0 terminated) } END; { **************************************************************************** BSStoreComponent describes a component of a Store. A component may be an external device or another Store. *************************************************************************** } BSStoreComponentPtr = ^BSStoreComponent; BSStoreComponent = RECORD componentType: BSComponentType; startingOffset: BSByteCount; { Where in the Store this } { component will be placed } sourceNode: RegEntryRef; { Physical components } srcStore: BSStoreRef; { Logical components } partitionInfo: BSPartitionDescriptor; { Logical components } END; { **************************************************************************** *************************************************************************** } BSStoreIOIteratorDataPtr = ^BSStoreIOIteratorData; BSStoreIOIteratorData = RECORD IOCI: IOCommonInfo; info: BSStoreInfo; END; { **************************************************************************** ***************************************************************************** ***************************************************************************** Block Storage API Functions These functions make up the Block Storage API. All functions are callable from the user or privileged bands. The API is split into the following sections: Navigation - operations to find a Store or Container and its relationship to other Stores and Containers Connections - operations to open and close connections with Stores and Containers Block Lists - operations to create and manipulate Block Lists, used as inputs for I/O operations I/O - operations to read and write date to Stores Accessibility - operations to change the accessibility of Store and Containers. Power-down and eject are handled via this interface Configuration - operations to add new devices, replace plug-ins, format and partition Stores and modify the relationships of Stores and Containers to each other. ***************************************************************************** ***************************************************************************** *************************************************************************** } { **************************************************************************** ***************************************************************************** Block Storage Navigation API ***************************************************************************** *************************************************************************** } { ****************************************************************************** BSStoreGetDeviceData - a simple iteration model to retrieve all of the Stores, the leaf Stores or the primary Stores. Inputs: selector - which set of Stores to retrieve kBSStoreGetLeafStores retrieves leaf stores kBSStoreGetAllStores retrieves all stores kBSStoreGetPrimaryStores retrieves only primary stores requestItemCount - the size of the buffer Outputs: iteratorData - the array of BSStoreIOIteratorData structures to be filled in totalItemCount - the actual number of items available (may be more than requestItemCount, though only requestItemCount structures will be filled in in iteratorData) Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSStoreGetDeviceData(selector: BSStoreGetSelector; requestItemCount: ItemCount; VAR totalItemCount: ItemCount; VAR iteratorData: BSStoreIOIteratorData): OSStatus; C; { ****************************************************************************** BSStoreIteratorCreate - Creates an iterator for Block Storage Stores which will be initially placed on startingStore. If starting Store is NULL the iterator will be placed "in the soup" at the root of the Store hierarchy Inputs: startingStore - the Store to begin at Outputs: newIterator - the returned iterator Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSStoreIteratorCreate(VAR startingStore: BSStoreRef; VAR newIterator: BSStoreIteratorID): OSStatus; C; { ****************************************************************************** BSStoreIteratorDispose - disposes of an iterator, freeing all resources associated with it Inputs: disposeIterator - the iterator to dispose Outputs: <none> Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSStoreIteratorDispose(disposeIterator: BSStoreIteratorID): OSStatus; C; { ****************************************************************************** BSStoreIteratorEnter - Moves the iterator into the child the iterator is currently on, placing it on the first child Inputs: iterator - the iterator to move Outputs: newStore - the Store we've just exited Returns: E_BSSuccessful ***************************************************************************** } FUNCTION BSStoreIteratorEnter(iterator: BSStoreIteratorID; VAR newStore: BSStoreRef): OSStatus; C; { ****************************************************************************** BSStoreIteratorExit - Moves the iterator into the parent the iterator is currently on, placing the iterator on the Store it exited. Inputs: iterator - the iterator to move Outputs: newStore - the Store we've been placed on Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSStoreIteratorExit(iterator: BSStoreIteratorID; VAR newStore: BSStoreRef): OSStatus; C; { ****************************************************************************** BSStoreIteratorRestartChildren - Places the iterator on the first child in the current Store Inputs: iterator - the iterator to restart Outputs: newChild - the child we've been placed on Returns: E_BSSuccess if succesful ***************************************************************************** } FUNCTION BSStoreIteratorRestartChildren(iterator: BSStoreIteratorID; VAR newChild: BSStoreRef): OSStatus; C; { ****************************************************************************** BSStoreIteratorRestartParent - Places the iterator on the first parent in the current Store Inputs: iterator - the iterator to restart Outputs: newParent - the parent we've been placed on Returns: E_BSSuccess if succesful ***************************************************************************** } FUNCTION BSStoreIteratorRestartParent(iterator: BSStoreIteratorID; VAR newParent: BSStoreRef): OSStatus; C; { ****************************************************************************** BSStoreIteratorNextChild - Moves the iterator to the next child Inputs: iterator - the iterator to move Outputs: newChild - the child we've been placed on changed - true if a parent or child has been added or deleted to this Store since the last BSStoreIteratorNextChild or BSStoreIteratorNextParent call Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSStoreIteratorNextChild(iterator: BSStoreIteratorID; VAR newChild: BSStoreRef; VAR changed: BOOLEAN): OSStatus; C; { ****************************************************************************** BSStoreIteratorNextParent - Moves the iterator to the next parent Inputs: iterator - iterator to move changed - true if a parent or child has been added or deleted since the last BSStoreIteratorNextChild or BSStoreIteratorNextParent call Outputs: newParent - the parent we've been placed on Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSStoreIteratorNextParent(iterator: BSStoreIteratorID; VAR newParent: BSStoreRef; VAR changed: BOOLEAN): OSStatus; C; { ****************************************************************************** BSContainerIteratorCreate - Creates an iterator for Block Storage Containers which will be initially placed on startingContainer. If starting Container is NULL the iterator will be placed "in the soup" at the root of the Container hierarchy. Inputs: startingContainer - the container to start at or NULL to start at the root of the Container hierarchy Outputs: newIterator - the created iterator Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSContainerIteratorCreate(VAR startingContainer: BSContainerRef; VAR newIterator: BSContainerIteratorID): OSStatus; C; { ****************************************************************************** BSContainerIteratorDispose - disposes of an iterator, freeing all resources associated with it Inputs: disposeIterator - the iterator to dispose Outputs: <none> Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSContainerIteratorDispose(disposeIterator: BSContainerIteratorID): OSStatus; C; { ****************************************************************************** BSContainerIteratorEnter - Moves the iterator into the child the iterator is currently on, placing it on the first child Inputs: iterator - the iterator to move Outputs: newContainer - the Container we've been placed on Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSContainerIteratorEnter(iterator: BSContainerIteratorID; VAR newContainer: BSContainerRef): OSStatus; C; { ****************************************************************************** BSContainerIteratorExit - exits to the parent of the current Container, placing the iterator on the Container it exited. (Containers may have only one parent) Inputs: iterator - the iterator to move Outputs: newContainer - the Container we've just exited Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSContainerIteratorExit(iterator: BSContainerIteratorID; VAR newContainer: BSContainerRef): OSStatus; C; { ****************************************************************************** BSContainerIteratorRestartChildren - Places the iterator on the first child in the current Container Inputs: iterator - the iterator to restart Outputs: newChild - the child we've been placed on Returns: E_BSSuccess if succesful ***************************************************************************** } FUNCTION BSContainerIteratorRestartChildren(iterator: BSContainerIteratorID; VAR newChild: BSContainerRef): OSStatus; C; { ****************************************************************************** BSContainerIteratorNextChild - Moves the iterator to the next child Inputs: iterator - the iterator to move Outputs: newChild - the child we've been placed on changed - true if a child has been added or deleted to this Container since the last BSContainerIteratorNextChild. Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSContainerIteratorNextChild(iterator: BSContainerIteratorID; VAR newChild: BSContainerRef): OSStatus; C; { ****************************************************************************** BSStoreFindByID - finds a Store by its identifier and returns a ref Inputs: storeID - the Store ID to find Outputs: foundStore - the found reference Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSStoreFindByID(VAR storeID: BSStoreID; VAR foundStore: BSStoreRef): OSStatus; C; { ****************************************************************************** BSStoreGetPropertySize - retrieves the size of the named property from the Store. Inputs: store - the Store to retrieve the property from propertyName - the name of the property to retrieve the size of propertyInstance - the instance of the property within this Store Outputs: propertySize - filled in with the size of the property Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSStoreGetPropertySize(VAR store: BSStoreRef; propertyName: CStringPtr; propertyInstance: BSStorePropertyInstance; VAR propertySize: ByteCount): OSStatus; C; { ****************************************************************************** BSStoreGetProperty - retrieves the named property from the Store. Inputs: store - the Store to retrieve the property from propertyName - the name of the property to retrieve the size of propertyInstance - the instance of the property within this Store propertySize - the size of the buffer passed in (on input) Outputs: propertyValue - a pointer to the buffer to be filled in propertySize - the size filled in (on exit) Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSStoreGetProperty(VAR store: BSStoreRef; propertyName: CStringPtr; propertyInstance: BSStorePropertyInstance; propertyValue: UNIV Ptr; VAR propertySize: ByteCount): OSStatus; C; { ****************************************************************************** BSContainerGetPropertySize - retrieves the size of the named property from the Container. Inputs: container - the Container to retrieve the property from propertyName - the name of the property to retrieve the size of propertyInstance - the instance of the property within this Store Outputs: propertySize - filled in with the size of the property Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSContainerGetPropertySize(VAR container: BSContainerRef; propertyName: CStringPtr; propertyInstance: BSContainerPropertyInstance; VAR propertySize: ByteCount): OSStatus; C; { ****************************************************************************** BSContainerGetProperty - retrieves the named property from the Container. Inputs: container - the Container to retrieve the property from propertyName - the name of the property to retrieve the size of propertyInstance - the instance of the property within this Container propertySize - the size of the buffer passed in (on input) Outputs: propertyValue - a pointer to the buffer to be filled in propertySize - the size filled in (on exit) Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSContainerGetProperty(VAR container: BSContainerRef; propertyName: CStringPtr; propertyInstance: BSContainerPropertyInstance; VAR propertySize: ByteCount): OSStatus; C; { **************************************************************************** ***************************************************************************** Block Storage Connection Operations ***************************************************************************** *************************************************************************** } { ****************************************************************************** BSStoreOpen - Opens a Connection to a Store Inputs: store - the Store to be opened options - options to the connection Outputs: newConnection - the created connection if successful Returns: E_BSSuccess on success E_BSOutOfResources if resources for the connection cannot be allocated E_BSStoreInUse if the Store has an exclusive connection or if an exclusive connection was requested to a Store with any connections open. E_BSStoreWriteProtected if Write access was requested to a read only Store E_BSStoreNotFound if store did not match any existing Stores ***************************************************************************** } FUNCTION BSStoreOpen(VAR store: BSStoreRef; options: BSStoreOpenOptions; VAR newConnection: BSStoreConnID): OSStatus; C; { ****************************************************************************** BSStoreConnClose - closes a Connection to a Store Inputs: connection - the connection to be closed Outputs: <none> Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems ***************************************************************************** } FUNCTION BSStoreConnClose(connection: BSStoreConnID): OSStatus; C; { ****************************************************************************** BSContainerOpen - Opens a Connection to a Container Inputs: container - the Container to be opened options - options to the connection Outputs: newConnection - the created connection if successful Returns: E_BSSuccess on success E_BSOutOfResources if resources for the connection cannot be allocated E_BSContainerInUse if the Container has an exclusive connection or if an exclusive connection was requested to a Container with any connections open. E_BSContainerNotFound if container did not match any existing Containers ***************************************************************************** } FUNCTION BSContainerOpen(VAR container: BSContainerRef; options: BSContainerOpenOptions; VAR newConnection: BSContainerConnID): OSStatus; C; { ****************************************************************************** BSContainerConnClose - closes a Connection to a Container Inputs: connection - the connection to be closed Outputs: <none> Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems ***************************************************************************** } FUNCTION BSContainerConnClose(connection: BSContainerConnID): OSStatus; C; { **************************************************************************** ***************************************************************************** Block Storage Block List Operations ***************************************************************************** *************************************************************************** } { ****************************************************************************** BSBlockListCreate - Creates a block list for use with Block Storage Inputs: numAnticipatedRange - the number of ranges expected Outputs: newList - the new list to which ranges may be added Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSBlockListCreate(numAnticipatedRanges: ItemCount; VAR newList: BSBlockListRef): OSStatus; C; { ****************************************************************************** BSBlockListAddRange - Appends a new range to an existing block list Inputs: appendList - the list to add the new range to startingOffset - the offset, in bytes on the device of the start of the range length - the length, in bytes, of the range Outputs: <none> Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSBlockListAddRange(appendList: BSBlockListRef; startingOffset: BSByteCount; length: ByteCount): OSStatus; C; { ****************************************************************************** BSBlockListFinalize - creates a descriptor to be used in a Block Storage read or write call from the memory list. After this call has been made no more ranges may be added to the list. Inputs: finalizeList - the list to be finalized Outputs: newDescriptor - the descriptor, to be used in a read/write call Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSBlockListFinalize(finalizeList: BSBlockListRef; VAR newDescriptor: BSBlockListDescriptorRef): OSStatus; C; { ****************************************************************************** BSBlockListDelete - Removes a Block List. All resources associated with this Block List are relinquished. This includes memory which was prepared for any of its descriptors. All descriptors are invalidated. This call should only be used to clean-up Block Lists in an abort condition. In normal usage, use BSBlockListDescriptorDelete to remove all descriptors and free the Block List. Inputs: deleteList - the descriptor to delete Outputs: <none> Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSBlockListDelete(deleteList: BSBlockListRef): OSStatus; C; { ****************************************************************************** BSBlockListDescriptorDelete - Removes a Block List Descriptor. All resources associated with this descriptor are relinquished. This includes memory which was prepared for this descriptor. If this was the last descriptor for a BlockList the BlockList is free'd also. Inputs: deleteDescriptor - the descriptor to delete Outputs: <none> Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSBlockListDescriptorDelete(deleteDescriptor: BSBlockListDescriptorRef): OSStatus; C; { ****************************************************************************** BSBlockListDescriptorSeek - Changes the offset within the Block List descriptor Inputs: seekDescriptor - the descriptor to seek within whence - how to seek offset - where to seek Outputs: newOffset - what the current offset is now Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSBlockListDescriptorSeek(seekDescriptor: BSBlockListDescriptorRef; whence: BSBlockListWhence; offset: SInt64; VAR newOffset: BSByteCount): OSStatus; C; { ****************************************************************************** BSBlockListGetExtent - Gets an extent at the current offset for up to the specified length Inputs: srcDesriptor - the descriptor to get the extent from requestedLen - how long an extent to try to get Outputs: startingByte - the starting byte address in the device of the extent extentLen - how long an extent within the descriptor was found Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSBlockListDescriptorGetExtent(srcDescriptor: BSBlockListDescriptorRef; requestedLen: ByteCount; VAR startingByte: BSByteCount; VAR extentLen: ByteCount): OSStatus; C; { ****************************************************************************** BSBlockListAddSimpleDescriptor - adds a new descriptor to a block list. The new descriptor begins at the current offset of the srcDescriptor. The offset of the srcDescriptor is updated to point at the first byte after the end of the new descriptor. Inputs: srcDescriptor - the descriptor to base the new descriptor upon length - how much the new descriptor should cover bias - the bias offset to be applied to the block address of srcDescriptor. When addresses are retrieve from newDescriptor bias will be added. Outputs: newDescriptor - the new descriptor Returns: E_BSSucess if successful ***************************************************************************** } FUNCTION BSBlockListAddSimpleDescriptor(srcDescriptor: BSBlockListDescriptorRef; length: BSByteCount; bias: BSByteCount; VAR newDescriptor: BSBlockListDescriptorRef): OSStatus; C; { ****************************************************************************** BSBlockListDescriptorGetInfo - returns information about the specified descriptor Inputs: infoDescriptor - the descriptor to get information about Outputs: info - the information Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSBlockListDescriptorGetInfo(infoDescriptor: BSBlockListDescriptorRef; VAR info: BSBlockListDescriptorInfo): OSStatus; C; { ****************************************************************************** BSBlockListDescriptorCheckBlockSizes - checks the extents specified by the descriptor and ensures that all start at 0 mod blockSize and are 0 mod blockSize in length. Inputs: checkDescriptor - the descriptor to check blockSize - the block size to check for Outputs: <none> Returns: E_BSSuccess if successful E_BSBlockListBadBlockSize if any extents are mis-aligned ***************************************************************************** } FUNCTION BSBlockListDescriptorCheckBlockSizes(checkDescriptor: BSBlockListDescriptorRef; blockSize: UInt32): OSStatus; C; { ****************************************************************************** BSBlockListDescriptorCheckBounds - checks the extents specified by the descriptor and ensures that none specify addresses beyond bound Inputs: checkDescriptor - the descriptor to check bound - the highest allowable address Outputs: <none> Returns: E_BSSuccess if successful E_BSBlockListBadBlockSize if any extents are mis-aligned ***************************************************************************** } FUNCTION BSBlockListDescriptorCheckBounds(checkDescriptor: BSBlockListDescriptorRef; bound: BSByteCount): OSStatus; C; { **************************************************************************** ***************************************************************************** Block Storage I/O Operations ***************************************************************************** *************************************************************************** } { ****************************************************************************** BSStoreConnRead - reads data from the Store indicated by the Connection. This is the simple version of the call, taking only a single range Inputs: readConnection - the connection to the Store to be read from startingOffset - the 64-bit offset into the device to start the read at bytesToRead - the 32-bit, unsigned, number of bytes to read Outputs: buffer - filled in with the bytes read Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems E_BSMPIOutOfStoreBounds if the request exceeds the boundaries of the Store E_BSMPIUnitNotResponding if the device does not respond E_BSMPITransferError if some error was detected during the transfer E_BSMPIMemoryAccessFault if the destination memory was not accessible E_BSMPIOutOfResources if a necessary resource (usually memory) could not be allocated E_BSMPIMediaRemoved if the media was removed ***************************************************************************** } FUNCTION BSStoreConnRead(readConnection: BSStoreConnID; startingOffset: BSByteCount; bytesToRead: ByteCount; buffer: UNIV Ptr): OSStatus; C; { ****************************************************************************** BSStoreConnWrite - writes data to the Store a Connection indicates. This is the simple version of the call taking only a single range. Inputs: writeConnection - the connection to the Store to be read from srcMem - where the data is to be taken from destBlocks - the blocks on the Store where the data is to be placed Outputs: <none> Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems E_BSMPIOutOfStoreBounds if the request exceeds the boundaries of the Store E_BSMPIUnitNotResponding if the device does not respond E_BSMPITransferError if some error was detected during the transfer E_BSMPIMemoryAccessFault if the destination memory was not accessible E_BSMPIOutOfResources if a necessary resource (usually memory) could not be allocated E_BSMPIMediaRemoved if the media was removed ***************************************************************************** } FUNCTION BSStoreConnWrite(writeConnection: BSStoreConnID; startingOffset: BSByteCount; bytesToWrite: ByteCount; buffer: UNIV Ptr): OSStatus; C; { ****************************************************************************** BSStoreConnReadSG - reads data from the Store indicated by the Connection. This is the scatter/gather version of the call. The Block List is generated by the calls above, the Memory List calls can be found in <MemoryLists.h>. Inputs: readConnection - the connection to the Store to be read from srcBlocks - a descriptor indicating the ranges on the device to be read destMemory - a Memory List descriptor indicating where the data is to be placed Outputs: <none> Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems E_BSMPIOutOfStoreBounds if the request exceeds the boundaries of the Store E_BSMPIUnitNotResponding if the device does not respond E_BSMPITransferError if some error was detected during the transfer E_BSMPIMemoryAccessFault if the destination memory was not accessible E_BSMPIOutOfResources if a necessary resource (usually memory) could not be allocated E_BSMPIMediaRemoved if the media was removed ***************************************************************************** } FUNCTION BSStoreConnReadSG(readConnection: BSStoreConnID; srcBlocks: BSBlockListDescriptorRef; destMemory: MemListDescriptorRef): OSStatus; C; { ****************************************************************************** BSStoreConnWriteSG - writes data to the Store a Connection indicates. This is the scatter/gather version of the call. The Block List is generated by the calls above, the Memory List calls can be found in <MemoryLists.h>. Inputs: writeConnection - the connection to the Store to be read from srcMem - where the data is to be taken from destBlocks - the blocks on the Store where the data is to be placed Outputs: <none> Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems E_BSMPIOutOfStoreBounds if the request exceeds the boundaries of the Store E_BSMPIUnitNotResponding if the device does not respond E_BSMPITransferError if some error was detected during the transfer E_BSMPIMemoryAccessFault if the destination memory was not accessible E_BSMPIOutOfResources if a necessary resource (usually memory) could not be allocated E_BSMPIMediaRemoved if the media was removed ***************************************************************************** } FUNCTION BSStoreConnWriteSG(writeConnection: BSStoreConnID; srcMemory: MemListDescriptorRef; destBlocks: BSBlockListDescriptorRef): OSStatus; C; { ****************************************************************************** BSStoreConnReadAsync - reads data from the Store indicated by the Connection. This is the asynchronous version of the simple call, taking only a single range. Inputs: readConnection - the connection to the Store to be read from startingOffset - the 64-bit offset into the device to start the read at bytesToRead - the 32-bit, unsigned, number of bytes to read notification - how the calling app wishes to be notified Outputs: buffer - filled in with the bytes read Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems E_BSMPIOutOfStoreBounds if the request exceeds the boundaries of the Store E_BSMPIUnitNotResponding if the device does not respond E_BSMPITransferError if some error was detected during the transfer E_BSMPIMemoryAccessFault if the destination memory was not accessible E_BSMPIOutOfResources if a necessary resource (usually memory) could not be allocated E_BSMPIMediaRemoved if the media was removed ***************************************************************************** } FUNCTION BSStoreConnReadAsync(readConnection: BSStoreConnID; startingOffset: BSByteCount; bytesToRead: ByteCount; VAR notification: KernelNotification; buffer: UNIV Ptr): OSStatus; C; { ****************************************************************************** BSStoreConnWriteAsync - writes data to the Store a Connection indicates. This is the asynchronous version of the simple call, taking only a single range. Inputs: writeConnection - the connection to the Store to be read from srcMem - where the data is to be taken from destBlocks - the blocks on the Store where the data is to be placed notification - how the caller wishes to be notified Outputs: bytesWritten - the number of bytes written (srcMem must remain a valid memory area until notification of completion is received) Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems E_BSMPIOutOfStoreBounds if the request exceeds the boundaries of the Store E_BSMPIUnitNotResponding if the device does not respond E_BSMPITransferError if some error was detected during the transfer E_BSMPIMemoryAccessFault if the destination memory was not accessible E_BSMPIOutOfResources if a necessary resource (usually memory) could not be allocated E_BSMPIMediaRemoved if the media was removed ***************************************************************************** } FUNCTION BSStoreConnWriteAsync(writeConnection: BSStoreConnID; startingOffset: BSByteCount; bytesToWrite: ByteCount; VAR notification: KernelNotification; buffer: UNIV Ptr): OSStatus; C; { ****************************************************************************** BSStoreConnReadSGAsync - reads data from the Store indicated by the Connection. This is the asynchronous version of the scatter/gather call. The Block List is generated by the calls above, the Memory List calls can be found in <MemoryLists.h>. Inputs: readConnection - the connection to the Store to be read from srcBlocks - a descriptor indicating the ranges on the device to be read destMemory - a Memory List descriptor indicating where the data is to be placed notification - how the caller wishes to be notified Outputs: <none> Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems E_BSMPIOutOfStoreBounds if the request exceeds the boundaries of the Store E_BSMPIUnitNotResponding if the device does not respond E_BSMPITransferError if some error was detected during the transfer E_BSMPIMemoryAccessFault if the destination memory was not accessible E_BSMPIOutOfResources if a necessary resource (usually memory) could not be allocated E_BSMPIMediaRemoved if the media was removed ***************************************************************************** } FUNCTION BSStoreConnReadSGAsync(readConnection: BSStoreConnID; srcBlocks: BSBlockListDescriptorRef; destMemory: MemListDescriptorRef; VAR notification: KernelNotification): OSStatus; C; { ****************************************************************************** BSStoreConnWriteSGAsync - writes data to the Store a Connection indicates. This is the asynchronous version of the scatter/gather call. The Block List is generated by the calls above, the Memory List calls can be found in <MemoryLists.h>. Inputs: writeConnection - the connection to the Store to be read from srcMem - where the data is to be taken from (the memory areas indicated by srcMem must remain valid until notification is received) destBlocks - the blocks on the Store where the data is to be placed notification - how the caller wishes to be notified of completion Outputs: <none> Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems E_BSMPIOutOfStoreBounds if the request exceeds the boundaries of the Store E_BSMPIUnitNotResponding if the device does not respond E_BSMPITransferError if some error was detected during the transfer E_BSMPIMemoryAccessFault if the destination memory was not accessible E_BSMPIOutOfResources if a necessary resource (usually memory) could not be allocated E_BSMPIMediaRemoved if the media was removed ***************************************************************************** } FUNCTION BSStoreConnWriteSGAsync(writeConnection: BSStoreConnID; srcMemory: MemListDescriptorRef; destBlocks: BSBlockListDescriptorRef; VAR notification: KernelNotification): OSStatus; C; { ****************************************************************************** BSStoreConnFlush - Flushes caches for this Store and any Stores this Store is derived from. Inputs: flushConnection - the connection to the Store to be flushed Outputs: <none> Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems E_BSMPIUnitNotResponding if the device does not respond E_BSMPITransferError if some error was detected during the transfer E_BSMPIMemoryAccessFault if the destination memory was not accessible E_BSMPIOutOfResources if a necessary resource (usually memory) could not be allocated E_BSMPIMediaRemoved if the media was removed ***************************************************************************** } FUNCTION BSStoreConnFlush(flushConnection: BSStoreConnID): OSStatus; C; { **************************************************************************** ***************************************************************************** Block Storage Accessibility Operations ***************************************************************************** *************************************************************************** } { ****************************************************************************** BSStoreConnGoToAccessibilityState - requests that a Store change its accessibility state to the one desired Inputs: connection - connection to the Store to change state newState - the desired state Outputs: <none> Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSStoreConnGoToAccessibilityState(connection: BSStoreConnID; newState: BSAccessibilityState): OSStatus; C; { ****************************************************************************** BSContainerConnGoToAccessibilityState - requests that a Container change its accessibility state to the one desired Inputs: connection - connection to the Container to change state newState - the desired state Outputs: <none> Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSContainerConnGoToAccessibilityState(connection: BSContainerConnID; newState: BSAccessibilityState): OSStatus; C; { **************************************************************************** ***************************************************************************** Block Storage Configuration ***************************************************************************** *************************************************************************** } { ****************************************************************************** BSStoreConnGetInfo - gets information about the Store a Connection indicates Inputs: infoConnection - the connection to the Store we want info about Outputs: infoBuffer - the information about the Store Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems ***************************************************************************** } FUNCTION BSStoreConnGetInfo(infoConnection: BSStoreConnID; VAR infoBuffer: BSStoreInfo): OSStatus; C; { ****************************************************************************** BSStoreCreate - creates a new Store. The Store is not added into the Block Storage Name Store hierarchy. Inputs: <none> Outputs: newStore - the ID of the new Store newStoreConnection - a connection to the created Store Returns: E_BSSuccess on success E_BSENoMoreStores if no more Stores can be allocated E_BSOutOfResources if other resources cannot be allocated ***************************************************************************** } FUNCTION BSStoreCreate(VAR newStore: BSStoreID; VAR newStoreConnection: BSStoreConnID): OSStatus; C; { ****************************************************************************** BSStoreConnDeleteAndClose - deletes the Store the current connection references and closes the connection Inputs: connection - the connection to the Store to be deleted Outputs: <none> Returns: E_BSSuccess on success E_BSStoreInUse if other connections are open to the Store ***************************************************************************** } FUNCTION BSStoreConnDeleteAndClose(connection: BSStoreConnID): OSStatus; C; { ****************************************************************************** BSStoreConnSetPartitionInfo - Sets data in a partition map entry on a Store Inputs: storeConnection - the connection to the Store partitionNum - the partition map entry to be set partitionInfo - a pointer to the new partition map entry info Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems E_BSPPINoPlugIn if the Store does not have a Partitioning Plug-in E_BSPPIOverlappingPartition if the requested partition overlaps another E_BSPPIOutOfStoreBounds if the request partition exceeds the limits of the Store ***************************************************************************** } FUNCTION BSStoreConnSetPartitionInfo(storeConnection: BSStoreConnID; partitionNum: ItemCount; VAR partitionInfo: BSPartitionDescriptor): OSStatus; C; { ****************************************************************************** BSStoreConnSetPartitionInfo - Gets data in a partition map entry on a Store Inputs: storeConnection - the connection to the Store partitionNum - the partition map entry to be retrieved partitionInfo - a pointer to the partition map entry info buffer Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems E_BSPPINoPlugIn if the Store does not have a Partitioning Plug-in ***************************************************************************** } FUNCTION BSStoreConnGetPartitionInfo(connection: BSStoreConnID; partitionNum: ItemCount; VAR partitionInfo: BSPartitionDescriptor): OSStatus; C; { ****************************************************************************** BSStoreConnMapPartition - Maps a partition from a Store onto another Store Inputs: srcConnection - the connection to the source Store partitionNum - the partition to be mapped destConnection - the connection to the destination Store destStartingBlock - where in the destination Store the mapped partition should be placed Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems E_BSPPINoPlugIn if the Store does not have a Partitioning Plug-in E_BSPPIMappingNotSupported if the mapping is not supported by either Store E_BSPPIPartitionNonExistant if the source partition doesn't exist E_BSEHierarchyTooDeep if this would create too many layers in the hierarchy (currently limited to 8) ***************************************************************************** } FUNCTION BSStoreConnMapPartition(srcConnection: BSStoreConnID; partitionNum: ItemCount; destConnection: BSStoreConnID; startingByte: BSByteCount): OSStatus; C; { ****************************************************************************** BSStoreConnGetComponents - Gets the components of a Store. Inputs: connection - the connection to the Store tableSize - size of the table to be filled in componentInfo - a pointer to an array of BSStoreComponentInfos to be filled in Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems ***************************************************************************** } FUNCTION BSStoreConnGetComponents(connection: BSStoreConnID; tableSize: ItemCount; VAR componentInfo: BSStoreComponent): OSStatus; C; { ****************************************************************************** BSStoreConnMapDevice - Maps an entire device into a Store Inputs: srcDevice - the Name Registry ID of the device destConnection - the connection to the destination Store Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems ***************************************************************************** } FUNCTION BSStoreConnMapDevice(srcDevice: RegEntryRef; destConnection: BSStoreConnID): OSStatus; C; { ****************************************************************************** BSStoreConnAssociateMappingPlugin - Attaches a Mapping Plug-in to a Store Inputs: connection - the connection to the Store mappingPlugin - the identifier of the Plugin to be attached Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems E_BSEPlugInNotFound if the plugin specified can't be found ***************************************************************************** } FUNCTION BSStoreConnAssociateMappingPlugin(connection: BSStoreConnID; mappingPlugin: BSMappingPlugInRef): OSStatus; C; { ****************************************************************************** BSStoreConnAssociatePartitioningPlugin - Attaches a Partitioning Plug-in to a Store Inputs: connection - the connection to the Store mappingPlugin - the identifier of the Plugin to be attached Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems E_BSEPlugInNotFound if the plugin specified can't be found ***************************************************************************** } FUNCTION BSStoreConnAssociatePartitioningPlugin(connection: BSStoreConnID; mappingPlugin: BSPartitioningPlugInRef): OSStatus; C; { ****************************************************************************** BSStoreConnPublish - makes a Store available for general use Inputs: connection - the connection to the Store Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems ***************************************************************************** } FUNCTION BSStoreConnPublish(connection: BSStoreConnID): OSStatus; C; { ****************************************************************************** BSStoreConnUnpublish - removes a Store from general use Inputs: connection - the connection to the Store Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems ***************************************************************************** } FUNCTION BSStoreConnUnpublish(connection: BSStoreConnID): OSStatus; C; { ****************************************************************************** BSStoreConnFormat - formats a Store in the specified format Inputs: connection - the connection to the Store formatType - the format number from possibleFormats in the BSStoreInfo structure Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems ***************************************************************************** } FUNCTION BSStoreConnFormat(connection: BSStoreConnID; formatType: BSFormatIndex): OSStatus; C; { ****************************************************************************** BSContainerConnGetInfo - gets information about the Container a Connection indicates Inputs: infoConnection - the connection to the Container we want info about Outputs: infoBuffer - the information about the Container Returns: E_BSSuccess if successful E_BSBadConnection if the connection ID has problems ***************************************************************************** } FUNCTION BSContainerConnGetInfo(infoConnection: BSContainerConnID; VAR infoBuffer: BSContainerInfo): OSStatus; C; { ****************************************************************************** BSContainerCreate - Creates a new Container. The Container is not added into the Block Storage Container Hierarchy Inputs: <none> Outputs: newContainer - a connection to the newly created Container Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSContainerCreate(VAR newContainer: BSContainerConnID): OSStatus; C; { ****************************************************************************** BSContainerConnDeleteAndClose - deletes the Container and closes the connection to it. No other connections to the Container may be open. Inputs: deleteContainer - connection to the Container to be deleted Outputs: <none> Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSContainerConnDeleteAndClose(deleteContainer: BSContainerConnID): OSStatus; C; { ****************************************************************************** BSContainerConnInsertContainer - inserts a Container into another Container Inputs: destContainer - a connection to the Container to insert into insertContainer - connection to the Container to be inserted Outputs: <none> Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSContainerConnInsertContainer(destContainer: BSContainerConnID; putContainer: BSContainerConnID): OSStatus; C; { ****************************************************************************** BSContainerConnPublish - makes a Container available for use. Generates notifications as necessary Inputs: publishContainer - connection to the Container to be published Outputs: <none> Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSContainerConnPublish(publishContainer: BSContainerConnID): OSStatus; C; { ****************************************************************************** BSContainerConnUnpublish - removes a Container from general accessibility, does not delete it. The Container must not have any open connections or published children. Inputs: unpublishContainer - the Container to unpublish Outputs: <none> Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSContainerConnUnpublish(unpublishContainer: BSContainerConnID): OSStatus; C; { ****************************************************************************** BSContainerConnSetDevice - sets the device the Container plug-in will associate with. Should be called before BSContainerConnAssociatePlugIn for bare Containers. Inputs: connection - a connection to the Container we're associating the plug-in with deviceNode - the device the Container plug-in will interact with Outputs: <none> Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSContainerConnSetDevice(connection: BSContainerConnID; deviceNode: RegEntryRef): OSStatus; C; { ****************************************************************************** BSContainerConnAssociatePlugIn - Associates a Container plug-in with a Container Inputs: connection - a connection to the Container we're associating the plug-in with plugIn - the new plug in to be associated Outputs: <none> Returns: E_BSSuccess if successful ***************************************************************************** } FUNCTION BSContainerConnAssociatePlugIn(connection: BSContainerConnID; plugIn: BSContainerPlugInRef): OSStatus; C; {$ENDC} {$ALIGN RESET} {$POP} {$SETC UsingIncludes := BlockStorageIncludes} {$ENDC} {__BLOCKSTORAGE__} {$IFC NOT UsingIncludes} END. {$ENDC}